package com.zcy.basic.util;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 *
 * </p>
 *
 * @author lucker
 * @date 2023/11/29 19:08
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "分页信息", description = "PageInfo")
public class PageInfo {

    @ApiModelProperty(value = "关键字")
    private String keyword;

    @ApiModelProperty(value = "当前页")
    private Long currentPage;

    @ApiModelProperty(value = "每页显示条数")
    private Long pageSize;

    @ApiModelProperty(value = "开始位置")
    public Long getStart() {
        return (currentPage - 1) * pageSize;
    }
}
